package com.work.chat.custom.server.config;

import com.work.chat.custom.server.config.model.UserInfo;

public class LocalUserInfoAccessContext {

    private  final static   ThreadLocal<UserInfo> userInfoAccessContext = new ThreadLocal<>();

    public static void set(UserInfo userInfo)
    {
        userInfoAccessContext.set(userInfo);
    }

    public static void clear()
    {
        userInfoAccessContext.remove();
    }

    public static UserInfo getuserInfoAccessContext()
    {
        return userInfoAccessContext.get();
    }

}
